package mvc.helix;

import java.awt.Dimension;

import javax.media.opengl.GL;
import javax.swing.JLabel;

import org.geom.curve.ICurve;
import org.geom.render.ViewJOGL;

import mvc.ControllerMouse3D;

public class HelixView3D extends ViewJOGL {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static boolean curvePointVisibility = true;
	public static boolean drawCurvePoints = true;
	private ICurve curve;

	
	public HelixView3D(ICurve model, Dimension d) {
		super();
		this.curve = model;

		this.setPreferredSize(d);
		add(new JLabel("3d view"));	
	}
	
	@Override
	public void render(GL gl) {
		
		drawCenter(gl);
		if(curvePointVisibility)drawCurvePoints(curve.getPoints(), gl);
		
	}
	
	public void addMouseKeybController(ControllerMouse3D controller3d) {
		addMouseListener(controller3d);
		addMouseMotionListener(controller3d);
		addKeyListener(controller3d);
	}


}
